class CreateBuildingServices < ActiveRecord::Migration
  def self.up
    create_table :building_services do |t|
      t.references :building
      t.references :service

      t.timestamps
    end
     add_index(:building_services, [:building_id, :service_id], :unique => true)
  end

  def self.down
    remove_index(:building_services, :column => [:building_id, :service_id])
    drop_table :building_services
  end
end
